A controller of the above-described type for an internal combustion engine controls the combustion of the engine on the basis of certain drive control parameters, such as the ignition timing and the air-fuel ratio, so as to optimize in terms of the driving performance the values and ranges of fluctuation of certain combustion parameters. These combustion parameters, include e.g. maximum combustion pressure P.sub.max, crank angle .theta.P.sub.max at the time of achieving the maximum combustion pressure P.sub.max, maximum rise rate dP/d.theta..sub.max of the combustion pressure, and indicated mean effective pressure Pi. These combustion parameters are determined by the controller on the basis of the pressure profile in the cylinders of the engine which is detected by a pressure sensor.
A controller for an internal combustion engine of the above-described type is therefore required to accurately detect the pressure profile on which the control of the combustion is based.
However, since the pressure sensor is directly attached to the engine, it is subjected to significant changes in temperature, resulting in a conspicuous tendency to deteriorate with age. In view of this, as well as its initial instability, the detection of the pressure profile achieved by the sensor is in practice far from accurate.
As a result of the poor accuracy of the pressure profile, a controller for an internal combustion engine of the conventional type encounters difficulty in performing optimum control of the combustion of an engine at all times. Furthermore, a controller for an internal combustion engine of the conventional type is prone to inappropriately control the drive control parameters in an attempt to perform control on the basis of the detected pressure profile even when no combustion is occurring such as during cranking or a fuel cut.